<template>
    请输入姓名：<input type="text" v-model="username">
    <div>姓名是：{{ username }}</div>
    <input type="text" v-model.trim="num1"> + <input type="text" v-model.trim="num2"> = {{ num1 + num2 }}
</template>

<script setup>
    import {ref} from 'vue'
    const username = ref('子逸')
    const num1 = ref(1)
    const num2 = ref(2)
</script>